/**
 * @param {string[]} sentences
 * @return {number}
*/
var mostWordsFound = function(sentences) {
  let result = 0;
  for(let i = 0; i < sentences.length; i++) {
    result = Math.max(result, sentences[i].split(" ").length);
  }
  return result;
};
let sentences = ["alice and bob love leetcode", "i think so too", "this is great thanks very much"];
console.log(mostWordsFound(sentences));
sentences = ["please wait", "continue to fight", "continue to win"];
console.log(mostWordsFound(sentences));

